<!doctype html>
<html lang="en" class="no-js">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><g:layoutTitle default="Some Title"/></title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection"/>
    <asset:stylesheet src="boc/weui.min.css"/>
    <asset:stylesheet src="boc/jquery-weui.min.css"/>
    <asset:stylesheet src="boc/boc.css"/>
    %{--<asset:stylesheet src="boc/webuploader.css"/>--}%
    <asset:javascript src="boc/jquery.min.js"/>
    <asset:javascript src="boc/jquery-weui.min.js" charset="UTF-8"/>
    <asset:javascript src="boc/webuploader.min.js"/>


</head>

<body>
<div class="message-box" style="top: 25%;">
    <div class="helpMsg hide"></div>
</div>
<div class="weui-gallery" id="gallery">
    <span class="weui-gallery__img" style="background-image: url(xxx);" id="galleryImg"></span>

    <div class="weui-gallery__opr">
        <a href="javascript:" class="weui-gallery__del">
            <i class="weui-icon-delete weui-icon_gallery-delete"></i>
        </a>
    </div>
</div>


<g:layoutBody/>
<script>
    $(function () {

//        禁止浏览器的回退
        history.pushState(null, null, document.URL);
        window.addEventListener('popstate', function () {
            history.pushState(null, null, document.URL);
//            $.toast("业务申请中，不支持回退", "text");
        });
        $('select').change(function () {
            setSelectColor($(this));
        });
        setSelectColor($('select'));
        function setSelectColor(select) {
            $.each(select, function (index, item) {
                if ($(this).val() == '') {
                    $(this).css('color', '#ccc');
                } else {
                    $(this).css('color', '#333');
                }
            });

        }

//        导航栏

        $('.weui-navbar .weui-navbar__item').click(function () {
            if ($(this).hasClass('weui_bar__item--on')) {
                return;
            }
            else {
                $(this).addClass('weui_bar__item--on').siblings().removeClass('weui_bar__item--on');
            }

        });

        var $input = $("input");
        for (var i = 0; i < $input.length; i++) {
            $input.eq(i).attr("autocomplete", "off");
        }

        $('#downMe').click(function () {
            var opportunityId = $("#id").val();
            $.prompt({
                title: '拒绝原因',
                input: '',
                empty: false,
                buttonOK: "确定",
                buttonCancel: "取消",
                onOK: function (input) {
                    $.ajax({
                        url: "/bocAppOpportunity/reject",
                        type: "POST",
                        data: {
                            'id': opportunityId,
                            'memo': input
                        },
                        success: function (result) 
                        {
                            if (result.status == 'success') {
                                window.location.href = "/bocAppOpportunity/businessTransactionOpportunity/" + opportunityId
                            }
                        }
                    })
                },
                onCancel: function () {
                }
            });
            $("#weui-prompt-input").remove();
            $(".weui-dialog__bd").append('<textarea  rows="8" class="weui_input weui-prompt-input" rows="3" style="height: 80px;" id="weui-prompt-input" value=""></textarea>');
        })
        
    })


</script>
</body>
</html>
